package model

import "gorm.io/gorm"

type Dependency struct {
	gorm.Model
	Name       string `gorm:"not null"`
	Desc       string
	Protocol   string `gorm:"not null"`
	TargetType string `gorm:"not null;uniqueIndex:idx_module_target;type:varchar(255)"`
	TargetID   string `gorm:"not null;uniqueIndex:idx_module_target;type:varchar(255)"`
	State      uint   `gorm:"not null"`
	ModuleID   uint   `gorm:"not null;uniqueIndex:idx_module_target"`
	Module     Module `gorm:"constraint:OnUpdate:CASCADE"`
}
